package com.chw.admin.role;

import java.util.List;
import java.util.Map;

import com.github.pagehelper.PageInfo;

public interface ISysRoleService {
	
	PageInfo<SysRole> page(SysRole record, int currentPage, int pageSize) throws Exception;
	
	SysRole selectById(String id) throws Exception;
	
	void saveOrUpdate(SysRole record) throws Exception;
	
	void updateStatus(String id, String status) throws Exception;
	
	void delete(String id) throws Exception;
	
	void addGroupToSysRole(SysRoleGroup record) throws Exception;
	
	void addUserToSysRole(SysRoleUser record) throws Exception;
	
	List<Map<String,Object>> getUserByRole(SysRoleUser record) throws Exception;
	
	List<Map<String,Object>> getGroupByRole(SysRoleGroup record) throws Exception;
	
	void deleteGroupFormRole(SysRoleGroup record) throws Exception;
	
	void deleteUserFormRole(SysRoleUser record) throws Exception;
	
	boolean hasRoleName(String name,String id) throws Exception;
}
